package com.iflytek.read;

import java.util.Base64;

/**
 * @author wangshuai
 */
public class Constant {

    /**
     * 搜索的文件类型，三种
     */
    public static final String FILE_TXT = "txt";
    public static final String FILE_PDF = "pdf";
    public static final String FILE_DOC = "doc";

    /**
     * 用户信息 key
     */
    public static final String KEY_TOKEN = "token";
    public static final String KEY_USER_ID = "user_id";
    public static final String KEY_USER_NAME = "user_name";
    /**
     * H5不同链接地址
     * 生产环境
     */
    public static final String H5_URL = "https://assistant.kunlungpt.cn/h5/portal/read-alone";
    /**
     * 测试环境
     */
    public static final String H5_URL_TEST = "https://test-assistant.ai.cnpc/h5/portal/read-alone/";
    /**
     * 文件批量上传接口名称
     */
    public static final String API_NAME_UPLOADS = "read/uploads";

    /**
     * 获取下一个要播放的切片的接口
     */
    public static final String API_NAME_FILE_SLICE = "read/createItemTTS";

    /**
     * 获取到要播放的切片内容生成的音频链接地址
     */
    public static final String API_NAME_FILE_PREVIEW = "file/preview/";

    /**
     * 读取配置
     */
    public static final String API_NAME_FILE_AUDIO = "read/audioRecord";

    /**
     * 保存配置
     */
    public static final String API_NAME_FILE_SAVE = "read/saveAudioRecord";

    public static final String TYPE_WAV = ".wav";

    public static final int PLAYER_ID_1 = 1;
    public static final int PLAYER_ID_2 = 2;
    public static final int MIN_LENGTH = 2;

    public static final float TYPE_2 = 2f;

    /**
     * 从H5详情页返回时：传 1
     */
    public static final int TYPE_SHOW_FLOAT_WINDOW_1 = 1;
    /**
     * 进入H5详情页时：传 2
     */
    public static final int TYPE_SHOW_FLOAT_WINDOW_2 = 2;
    /**
     * 点击听单列表item的播放按钮时：传 3
     */
    public static final int TYPE_SHOW_FLOAT_WINDOW_3 = 3;
    /**
     * 点击听单列表item的暂停按钮时：传 4
     */
    public static final int TYPE_SHOW_FLOAT_WINDOW_4 = 4;

    public static final String TYPE_HTTP = "http://";

    public static final String TYPE_HTTPS = "https://";
    public static final int TYPE_LOAD_FINISHED = 100;
    /**
     * 声音发生改变的广播
     */
    public static final String ACTION_VOLUME_CHANGED = "android.media.VOLUME_CHANGED_ACTION";
    public static final int TYPE_PLAY_BG_MUSIC_1 = 1;
    public static final int TYPE_PLAY_BG_MUSIC_2 = 2;
    public static final int SERVICE_SEND_MSG_TYPE = 10000;
    public static final int TYPE_CURRENT_PLAY = 4;

    public static final String KEY_NAME_PLAY_TYPE = "playType";
    public static final String KEY_NAME_NOVEL_ID = "novelId";
}